package com.ding.dailyup.model;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

import static javax.persistence.GenerationType.IDENTITY;

import org.hibernate.annotations.DynamicInsert;

@Entity
@DynamicInsert
@Table(name = "user_collect_stock")
public class UserCollectStock implements Serializable {

    public static final long serialVersionUID = 6330225878074491805L;
    private Long id;
    private Long userId;
    private String stockCode;
    private String stockName;
    private String collectPrice;
    private String remark;
    private Integer status;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;


    public UserCollectStock() {
    }

    public UserCollectStock(
            Long userId, String stockCode, String stockName, String collectPrice, String remark, Integer status, LocalDateTime createTime, LocalDateTime updateTime) {
        this.userId = userId;
        this.stockCode = stockCode;
        this.stockName = stockName;
        this.collectPrice = collectPrice;
        this.remark = remark;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }


    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    @Column(name = "userId")
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }


    @Column(name = "stockCode")
    public String getStockCode() {
        return stockCode;
    }

    public void setStockCode(String stockCode) {
        this.stockCode = stockCode;
    }


    /**
     * @return 股票名称
     */
    @Column(name = "stockName")
    public String getStockName() {
        return stockName;
    }

    public void setStockName(String stockName) {
        this.stockName = stockName;
    }


    /**
     * @return 自选价格
     */
    @Column(name = "collectPrice")
    public String getCollectPrice() {
        return collectPrice;
    }

    public void setCollectPrice(String collectPrice) {
        this.collectPrice = collectPrice;
    }


    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }


    /**
     * @return 可用状态
     */
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }


    @Column(name = "createTime")
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }


    @Column(name = "updateTime")
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

}